package pw.goyd.game.logic;

import pw.goyd.game.model.Player;
import pw.goyd.protocol.core.Serializer;

/**
 * 玩家信息序列化
 *
 * @author StanWind
 */
public class PlayerInfoResponse extends Serializer {
    private Player player;

    public Player getPlayer() {
        return player;
    }

    public void setPlayer(Player player) {
        this.player = player;
    }

    @Override
    protected void read() {

    }

    @Override
    protected void write() {
        writeString(player.getAccount_id());
        writeString(player.getIcon_source());
        writeString(player.getNickname());
        writeInt(player.getWin_times());
        writeInt(player.getAll_times());
        writeInt(player.getGold());
        writeInt(player.getDiamond());
    }

}
